<template>
  <div>
    <el-button
      type="primary"
      @click="handleClick"
    >
      Primary Button
    </el-button>
    <Filter :filter="filter0" />
  </div>
</template>

<script setup>
import { ref, onMounted } from "vue";
const filter0 = ref({
  relation: "且",
  conditions: [],
});
import Filter from "./components/spdbFilter.vue";

const handleClick = () => {
  filter0.value.conditions.push({
    id: Date.now().toString() + Math.random().toString(16).slice(2), // 唯一id
    attrName: "",
    // 1/属性名类型 Code 码值型
    attrNameType: null,

    operator1: "",

    operator1Opts: [],

    operator2: "",

    operator2Opts: [],

    field1: "",

    field2: "",
  });
};
</script>

<style scoped lang="scss">
.sty {
  :deep(.el-date-editor--daterange) {
    margin: 0 !important;
  }
}
</style>
